<!--
*Author：jxx
 *Contact：283591387@qq.com
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *业务请在@/extension/system/mytable/Stud_grade.js此处编写
 -->
<template>
    <view-grid ref="grid"
               :columns="columns"
               :detail="detail"
               :editFormFields="editFormFields"
               :editFormOptions="editFormOptions"
               :searchFormFields="searchFormFields"
               :searchFormOptions="searchFormOptions"
               :table="table"
               :extend="extend">
    </view-grid>
</template>
<script>
    import extend from "@/extension/mytable/mytable/Stud_grade.js";
    import { ref, defineComponent } from "vue";
    export default defineComponent({
        setup() {
            const table = ref({
                key: 'stud_grade_id',
                footer: "Foots",
                cnName: '学生分数',
                name: 'mytable/Stud_grade',
                url: "/Stud_grade/",
                sortName: "stud_grade_id"
            });
            const editFormFields = ref({"class_name":"","grade":"","fujian":""});
            const editFormOptions = ref([[{"title":"课程名称","required":true,"field":"class_name","type":"text"},
                               {"title":"分数","required":true,"field":"grade","type":"text"},
                               {"title":"试卷附件","field":"fujian","type":"text"}]]);
            const searchFormFields = ref({"class_name":"","grade":"","fujian":""});
            const searchFormOptions = ref([[{"title":"课程名称","field":"class_name","type":"text"},{"title":"分数","field":"grade","type":"text"},{"title":"试卷附件","field":"fujian","type":"text"}]]);
            const columns = ref([{field:'stud_grade_id',title:'stud_grade_id',type:'int',width:110,hidden:true,readonly:true,require:true,align:'left'},
                       {field:'stud_id',title:'学生编号',type:'int',width:110,hidden:true,readonly:true,require:true,align:'left'},
                       {field:'class_name',title:'课程名称',type:'string',width:110,require:true,align:'left',sort:true},
                       {field:'grade',title:'分数',type:'int',width:110,require:true,align:'left'},
                       {field:'fujian',title:'试卷附件',type:'string',width:110,align:'left'}]);
            const detail = ref({
                cnName: "#detailCnName",
                table: "#detailTable",
                columns: [],
                sortName: "",
                key: ""
            });
            return {
                table,
                extend,
                editFormFields,
                editFormOptions,
                searchFormFields,
                searchFormOptions,
                columns,
                detail,
            };
        },
    });
</script>
